package com.ysy.logistics.entities.device.dto;

import com.ysy.logistics.entities.device.Device;
import com.ysy.logistics.myenum.DeviceType;
import lombok.Data;

/**
 * @author 姚斯羽
 * @date 2025/4/16 21:48
 * @description:
 */
@Data
public class DeviceDto  extends Device {
    private String deviceTypeName;
    private String warehouseName;
    private String unitName;

    @Override
    public Device setDeviceType(Integer deviceType) {
        this.deviceTypeName = DeviceType.getNameByCode(deviceType);
        this.unitName = DeviceType.getUnitByCode(deviceType);
        return super.setDeviceType(deviceType);
    }
}
